home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 018a / amac41.zip / RFR007.QM < prev    next >
Text File  |  1991-08-02  |  11KB  |  252 lines

  1. *                               RFR007.QM
  2. *        Written By Tom Hogshead, Macros Written By John Goodman
  3. *                       [ See RFRMxx.QM For Use ]
  4. *                             August 2, 1991
  5. *  Key       Subfile                       Description
  6. * =====  ==============  ====================================================
  7. * @(j)                   JoinLine With Single Space At Join Point
  8. * ^(Enter)               Split Line and Align with Last Non-Blank Line
  9. *                           (Simulates Enter Key Operation with AutoIndent ON)
  10. * ^(F2__)                Split Line and Outdent One Tab Stop
  11. *  (Tab)                 Insert Spaces to Next Tab Stop Regardless of Ins Mode
  12. * #(Tab_)                Delete Characters to Previous Tab Stop Regardless
  13. *                                                            of Insert Mode
  14. * ^(F6__)                Delete to Beginning of Line
  15. * ^(F4__)                Duplicate Line Up to Cursor Position
  16. *
  17. *                        (All macros in rfr007.qm were written by
  18. *                         John Goodman, except if noted)
  19. *
  20. *         {e:\up\RFRM*}--Return To RFRMxx.QM
  21. *
  22. *-- eoi
  23.  
  24.  
  25.  
  26. * The following macros were written by John Goodman, except if noted:
  27.  
  28. * ===========================================================================
  29. *  BBS: SemWare Support BBS
  30. * Date: 07-25-91 (15:15)             Number: 505,506
  31. * From: JOHN GOODMAN                 Refer#: NONE
  32. *   To: TOM HOGSHEAD                  Recvd: YES
  33. * Subj: NEW MACROS!                    Conf: 3 Macros
  34. * ---------------------------------------------------------------------------
  35. * Tom,
  36. *
  37. * The following (new!) macros should be handy for both
  38. * programmer types and writer types and are good candidates for
  39. * inclusion in QCONFIG.DAT (for me, anyway!).  I think some of them
  40. * are useful enough that we may want to post them to the main board
  41. * for more widespread visibility (after your review and comment, of
  42. * course!).
  43. *
  44. * As you know, I generally work with AutoIndent mode OFF, but
  45. * occasionally like to have my next line aligned with the current
  46. * line (switching modes is *such* a chore!).  The first macro makes
  47. * the Ctrl-Enter key work like the Enter key does when
  48. * (sticky) AutoIndent mode is ON (the macro can be used in either
  49. * mode).  I've provided two flavors of Ctrl-Enter, one for people
  50. * who normally work with AutoIndent OFF and one for people who
  51. * normally work with AutoIndent ON.
  52. *
  53. * The next two macros are similar to the first macro, but they
  54. * indent/outdent the new line to the next/previous tab stop.  These
  55. * two macros should be very handy for writing structured code and
  56. * should be useful to people who work with AutoIndent ON or OFF.
  57. *
  58. * The remaining macros are just simple little ditties that came to
  59. * mind as I was working on the others. Per usual, all of the macros
  60. * should work consistently regardless of mode toggle or QConfig
  61. * settings.
  62. *
  63. * (excitedly) ...John
  64.  
  65. * 
  66. * ---------------------------------------------------------------
  67. * Ctrl-(Enter)  Split Line and Align with Last Non-Blank Line
  68. *              (Simulates Enter Key Operation with AutoIndent ON)
  69. * ---------------------------------------------------------------
  70. * This macro makes the Ctrl-Enter key act like the Enter key does
  71. * when AutoIndent mode is ON; that is, it splits the current line
  72. * at the cursor (creating a new line) and aligns the new line with
  73. * the first character of the last non-blank line.  The macro works
  74. * like "sticky" AutoIndent mode in that it aligns the new line with
  75. * the last non-blank line, not just the previous (possibly blank)
  76. * line.  This macro differs from normal Enter key operation in that
  77. * it always creates a new line, whereas the Enter key does not
  78. * create a new line if Insert mode is OFF or the QConfig option to
  79.             * create new lines with the Enter key is set to "No".
  80. *
  81. ^Enter  MacroBegin
  82.     UnmarkBlock         * Ensure no blocks marked
  83.     SplitLine "_"       * Split line at cursor position; type '_'
  84.     JoinLine            * Re-join the line
  85.     CursorLeft          * Move cursor to '_'
  86.     SplitLine           * Split the line again
  87.     CursorDown          * Move to the new line
  88.     Align               * Align it with last non-blank line
  89.     CursorUp CursorUp   * Move back to end of original line
  90.     WordRight           * Move to 1st char of new line
  91.     DelCh               * Delete the '_' char
  92. *
  93. * 17 bytes Wed  07-24-1991  18:51:42 (JG)
  94.  
  95. * 
  96. * ----------------------------------------------------------------
  97. * Ctrl-(Enter)  Split Line and Left Justify at Column 1
  98. *              (Simulates Enter Key Operation with AutoIndent OFF)
  99. * ----------------------------------------------------------------
  100. * This macro is for users who generally operate with AutoIndent
  101. * mode set ON.  The macro makes the Ctrl-Enter key work the same as
  102. * the Enter key does when AutoIndent is OFF; that is, it splits the
  103. * current line at the cursor (creating a new line) and left
  104. * justifies the new line at column 1.  This macro differs from
  105. * normal Enter key operation in that it always creates a new line,
  106. * whereas the Enter key does not create a new line if Insert mode
  107. * is OFF or the QConfig option to create new lines with the Enter
  108. * key is set to "No".
  109. *
  110. * This macro is useful when you're writing indented text, but want
  111. * the next line to begin at column 1.
  112. *
  113. * ^Enter MacroBegin SplitLine BegLine CursorDown
  114.  
  115. * 
  116. * -------------------------------------------------
  117. * Shift-(F2_)  Split Line and Indent One Tab Stop
  118. * -------------------------------------------------
  119. * This macro splits the current line at the cursor (creating a new
  120. * line) and aligns the beginning of the new line one tab stop to
  121. * the right of the beginning of the last non-blank line.  This
  122. * macro is useful for indenting the next line of text when writing
  123. * documents or structured program code.
  124. *
  125. * The macro is generally equivalent to typing "Enter Tab" when
  126. * AutoIndent mode is ON, but works more consistently with different
  127. * AutoIndent and Insert mode settings.
  128. *
  129.  
  130. #F2 MacroBegin
  131.     UnmarkBlock         * Ensure no blocks marked
  132.     SplitLine "_"       * Split line at cursor position; type '_'
  133.     JoinLine            * Re-join the line
  134.     CursorLeft          * Move cursor to '_'
  135.     SplitLine           * Split the line again
  136.     CursorDown          * Move to the new line
  137.     Align               * Align it with last non-blank line
  138.     CursorUp CursorUp   * Move back to end of original line
  139.     WordRight           * Move to 1st char of new line
  140.     DelCh               * Delete the '_' char
  141.     SplitLine           * Split the new line
  142.     TabRt               * Move to next tab position
  143.     JoinLine            * Re-join the line at new position
  144. *
  145. * 20 bytes Wed  07-24-1991  18:51:48 (JG)
  146.  
  147. * 
  148. * ---------------------------------------------
  149. * Ctrl-(F2__)  Split Line and Outdent One Tab Stop
  150. * ---------------------------------------------
  151. * This macro splits the current line at the cursor (creating a new
  152. * line) and aligns the beginning of the new line one tab stop to
  153. * the left of the beginning of the last non-blank line.  This macro
  154. * is useful for outdenting the next line of text when writing
  155. * documents or structured program code.
  156. *
  157. * The macro is generally equivalent to typing "Enter Shift-Tab"
  158. * when AutoIndent mode is ON, but works more consistently with
  159. * different AutoIndent and Insert mode settings.
  160. *
  161. ^F2 MacroBegin
  162.     UnmarkBlock         * Ensure no blocks marked
  163.     SplitLine "_"       * Split line at cursor position; type '_'
  164.     JoinLine            * Re-join the line
  165.     CursorLeft          * Move cursor to '_'
  166.     SplitLine           * Split the line again
  167.     CursorDown          * Move to the new line
  168.     Align               * Align it with last non-blank line
  169.     CursorUp CursorUp   * Move back to end of original line
  170.     WordRight           * Move to 1st char of new line
  171.     DelCh               * Delete the '_' char
  172.     SplitLine           * Split the new line
  173.     TabLt               * Move to previous tab position
  174.     JoinLine            * Re-join the line at new position
  175. *
  176. * 20 bytes Wed  07-24-1991  18:51:53 (JG)
  177.  
  178. * 
  179. * ----------------------------------------------------------------
  180. * (Tab)  Insert Spaces to Next Tab Stop Regardless of Insert Mode
  181. * ----------------------------------------------------------------
  182. * This macro makes the Tab key work the same with Insert mode OFF
  183. * as it does when Insert mode is ON; that is, Tab will always
  184. * insert spaces up to the next tab stop and not just move the
  185. * cursor to the next tab stop.
  186. *
  187. Tab MacroBegin SplitLine TabRt JoinLine
  188. * 7 bytes Sat  07-27-1991  09:05:32 (JG Tab)
  189.  
  190. * 
  191. * ----------------------------------------------------------------
  192. * Shift-(Tab_)  Delete Characters to Previous Tab Stop Regardless
  193. *               of Insert Mode
  194. * ----------------------------------------------------------------
  195. * This macro makes the Shift-Tab ("backtab") key work the same with
  196. * Insert mode OFF as it does when Insert mode is ON; that is,
  197. * Shift-Tab will always delete the characters from the cursor
  198. * position to the previous tab stop and not just move the cursor to
  199. * the previous tab stop.
  200. *
  201. #Tab MacroBegin SplitLine TabLt DelToEOL JoinLine
  202. * 8 bytes Sat  07-27-1991  09:05:05 (JG #Tab)
  203.  
  204. * 
  205. * -----------------------------------------
  206. * Ctrl-(F6__)  Delete to Beginning of Line
  207. * -----------------------------------------
  208. * This macro deletes all characters to the left of the current
  209. * cursor position.  Alternate (shorter) version of macro in QEdit
  210. * READ.ME file.
  211. *
  212. ^F6 MacroBegin SplitLine DelLine BegLine
  213. * 7 bytes Sat  07-27-1991  09:05:45 (JG ^F6)
  214.  
  215. * 
  216. * --------------------------------------------------
  217. * Ctrl-(F4__)  Duplicate Line Up to Cursor Position
  218. * --------------------------------------------------
  219. * This macro creates a new line below the current line and
  220. * duplicates the characters up to the current cursor position.
  221. *
  222. ^F4 MacroBegin DupLine DelToEOL
  223. * 6 bytes Sat  07-27-1991  09:05:54 (JG ^F4)
  224.  
  225. * 
  226. *----------------------------------------------------
  227. * @(j) Join Lines with Single Space at Join Point
  228. *----------------------------------------------------
  229. *
  230. * This macro is handy for making single line macros for QCONFIG.DAT,
  231. * or just to help in writing macros or text.
  232. *
  233. * To make a single line macro for QCONFIG.DAT, remove all comments in
  234. * a macro, and run @j on each line.  Alternatively, use @7 in
  235. * MACRxx.QM, and then @j on each line.
  236. *
  237. @j MacroBegin
  238.     EndLine
  239.     CursorRight
  240.     CursorRight
  241.     JoinLine
  242.     CursorLeft
  243.     DelRtWord
  244. *
  245. *
  246. * 17 bytes Mon  03-18-1991  22:07:08
  247. * 16 bytes Mon  07-15-1991  10:51:34 (TH @j, removed unecessary markline)
  248. * 15 bytes Sat  07-20-1991  13:56:46 (TH @j, removed unecessary unmarkblock)
  249. * 12 bytes Fri  07-26-1991  16:18:53 (TH @j, change to splitline/delline)
  250. * 10 bytes Fri  07-26-1991  19:30:39 (JG @j, shortened)
  251.  
  252.